1. Field of the Invention
The present invention relates to a power shutoff method to control shutoff of the power for the terminal connected to the TCP/IP network and to a recording medium recording the program therefor.
2. Description of the Related Art
With recent diffusion of the Internet, many people desire to access the Internet from portable terminals such as handy phones and PDAs to enjoy services such as E-mails and WWW. There are some ways to connect the Internet from a portable terminal. One of them is a direct connection method to have a TCP/IP protocol stack in the portable terminal for direct connection to the Internet.
Since the portable terminal is usually driven by batteries, it is necessary to minimize the consumption power to extend the operation hours. The power is shut off while the terminal is not in use, but it is preferable to maintain the connection with the server even though the power is temporarily shut off.
When the TCP is used, however, TCP may send and receive data even while the application software is not making any data communications. If the power is shut off during such period, the connection with the server may be lost. To solve this problem, a protocol converter called xe2x80x9cgatewayxe2x80x9d has been conventionally used for connection with the Internet from a portable terminal. According to the Japanese Patent Application Laid-open (Kokai) No. Heisei 10-69446, for example, a device called the front end box serves as a relay for restart after power shutoff.
However, the conventional invention above had a drawback that the use of the gateway makes the entire system expensive and also makes its control complicated.
The present invention has been made under the circumstances above. It is an object of the present invention to provide, when the TCP/IP is directly incorporated to the portable terminal, a method to shut off the power without the need of gateway and with maintaining the connection with the server as well as to provide a recording medium containing the program therefor.
According to one aspect of the invention, a power shutoff method for the TCP/IP network device comprising the steps of
a step to monitor the connection status of the terminal connected to the TCP/IP network and judge whether the power for the terminal can be shut off according to the result of the monitoring, and
a step to shut off the power for the terminal when it is judged acceptable to shut off the power in the judgment step.
Thus, according to the present invention, whether the power of the terminal can be shut off or not is judged based on the connection status of the terminal connected to the TCP/IP network and, when it is judged possible, the power for the terminal is shut off.
In the preferred construction, a power shutoff method for the TCP/IP network device further comprises
a step to provide a power shutoff permit notice to the terminal when the power shutoff for the terminal is judged acceptable, and
a step to shut off the power for the terminal upon receipt of the power shutoff permit notice.
In another preferred construction, the power shutoff is judged acceptable in the judgment step
when the connection status satisfies all of these conditions:
TCP send buffer is empty;
Delayed ACK is not in operation; and
TCP status is not any of SYN_RCVD, SYN_SENT, LAST_ACK, FIN_WAIT_1 and CLOSING.
In another preferred construction, the connection status of the terminal connected to the TCP/IP network is monitored all the time and the judgment step is executed all the time.
In another preferred construction, the judgment step is executed only when the power shutoff is requested by the application of the terminal.
In another preferred construction, the terminal is a portable terminal.
According to another aspect of the invention, a computer readable memory storing the program which controls the computer and shuts off the power for the TCP/IP network device,
the program
monitoring the connection status of the terminal connected to the TCP/IP network and judging whether the power for the terminal can be shut off according to the result of the monitoring, and
executing the power shutoff for the terminal when it is judged acceptable to shut off the power in the judgment step.
Other objects, features and advantages of the present invention will become clear from the detailed description given herebelow.